package Demo03;

public class Demo02GenericClass {
    public static void main(String[] args) {
        Generic gc = new Generic();
        gc.setName("涨价");
        Object obj = gc.getName();
        System.out.println(obj);

        Generic<Integer> gc2 = new Generic<>();
        gc2.setName(1);

        Integer name  = gc2.getName();
        System.out.println(name);

        Generic<String> gc3 = new Generic<>();
        gc3.setName("小明");

        String name1 = gc3.getName();
        System.out.println(name1);
    }
}
